var app = getApp()
Component({
  properties: {
    footeractive: {
      type: Number,
      default: 2
    },
  },
  data: {
    list: [
      {
        id: 1,
        name: '首页',
        iconname: 'icon-footer-home',
        href: '/pages/index/index',
        active: ''
      },
      {
        id: 2,
        name: '发现',
        iconname: 'icon-footer-discover',
        href: '/pages/discoverList/discoverList',
        active: ''
      },
      {
        id: 3,
        name: '我的',
        iconname: 'icon-footer-my',
        active: '',
        href: '/pages/middlewave/middlewave?href=' + encodeURIComponent(app.globalData.frontUrl + 'userCenter'),
      }
    ]
  },
  attached() {
    console.log(this.properties.footeractive)
  },
  methods: {
    bindtap(e) {
      let href = e.currentTarget.dataset.href
      console.log(href)
      wx.navigateTo({
        url: href
      })
    },
  }
})